package study.week05.bytebuddy.instrument;

import study.week05.bytebuddy.agent.target.AgentObject;
import study.week05.bytebuddy.instrument.target.InstrumentObject;

public class InstrumentTest {

    public static void main(String[] args) {
        //首先指定Premain类
        //修改resources目录下 META-INF\MANIFEST.MF的内容:
        //Premain-Class: study.week05.bytebuddy.instrument.MyInstrumentAgent
        //然后把项目打jar包 mvn package
        //然后增加vm参数: -javaagent:./target/week5-agent.jar
        InstrumentObject test = new InstrumentObject();
        test.method1();
        test.method2();
    }
}
